package com.yllt4cloud.base.api.feign;

import com.yllt4cloud.base.api.entity.SheBei;
import com.yllt4cloud.common.core.constant.CommonConstants;
import com.yllt4cloud.common.core.constant.SecurityConstants;
import com.yllt4cloud.common.core.util.ResultResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteSheBeiService", value = CommonConstants.BASE_SERVICE)
public interface RemoteSheBeiService {

    @GetMapping("/shebei/getSheBeiById/{sheBeiId}")
    ResultResp<SheBei> getSheBeiById(@PathVariable("sheBeiId") String sheBeiId
            , @RequestHeader(SecurityConstants.FROM) String from);

    @GetMapping("/shebei/getSheBeiByMacAddr/{macAddress}")
    ResultResp<SheBei> getSheBeiByMacAddr(@PathVariable("macAddress") String macAddress
            , @RequestHeader(SecurityConstants.FROM) String from);
}
